package com.beasts.ant.page.service.impl;

import com.beasts.ant.page.entity.User;
import com.beasts.ant.page.repository.UserRespository;
import com.beasts.ant.page.service.IAuthLoginService;
import lombok.NonNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Locker
 * @date 28/05/2018 3:59 PM
 * @since 1.0
 */
@Service
public class AuthLoginService implements IAuthLoginService {

    @Autowired
    private UserRespository userRespository;

    @Override
    public User authLogin(String username, String password) {

        @NonNull
        User user = userRespository.findByUsername(username);

        return user;
    }
}
